package com.esun.payment_api.service;


import com.esun.common.api.CommonResult;
import com.esun.payment_api.bean.*;
import com.esun.payment_api.domain.*;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Service
public interface DkClaimService {

    CommonResult claimReceive(Integer receiveId, User user);

    CommonResult saveClaim(DkClaim dkClaim, User user);

    CommonResult submitClaim(DkClaim dkClaim, User user);

    CommonResult resubmitClaim(DkClaim dkClaim, User user);

    CommonResult cancelClaim(Integer claimId, User user);

    CommonResult claimRelateInvoice(String invoiceStr, Integer claimId, User user);

    CommonResult claimRelateContract(String contractStr, Integer claimId, User user);

    CommonResult claimRelateTask(String taskStr, Integer claimId, User user);

    CommonResult claimCancelInvoice(String invoiceStr, Integer claimId, User user);

    CommonResult claimCancelContract(String contractStr, Integer claimId, User user);

    CommonResult claimCancelTask(String taskStr, Integer claimId, User user);

    CommonResult editClaimInvoice(DkClaimInvoice dkClaimInvoice);

    CommonResult editClaimContract(DkClaimContract dkClaimContract);

    CommonResult editClaimTask(DkClaimTask dkClaimTask);

    List<DkReceiveBean> getUnclaimedList(User user, String searchStr, String monthStr, String bankType, Integer pageSize, Integer pageNum);

    List<DkReceiveBean> getUnclaimedListSubs(User user, String searchStr, String bankType, Integer pageSize, Integer pageNum);

    List<DkClaimBean> getClaimList(String flowStatus, String searchStr, String monthStr, String deptName, String startTime, String endTime, String receiveType, String businessType, User user, Integer pageSize, Integer pageNum);

    SumDkReceiveMoneyBean getSumDkClaimMoney(String flowStatus, String searchStr, String monthStr, String deptName, String startTime, String endTime, String receiveType, String businessType, User user);

    CommonResult getClaimById(User user, Integer claimId);

    CommonResult getClaimInvoiceById(User user, Integer claimInvoiceId);

    CommonResult getClaimContractById(Integer claimContractId);

    CommonResult getClaimTaskById(Integer claimTaskId);

    CommonResult getClaimInvoiceByClaimId(User user, Integer claimId);

    CommonResult getClaimContractByClaimId(Integer claimId);

    CommonResult getClaimTaskByClaimId(Integer claimId);

    CommonResult getFlowByClaimId(User user, Integer claimId);

    CommonResult rejectClaim(User user, Integer flowId, Integer claimId, String flowNotes);

    CommonResult approveClaim(User user, Integer flowId, Integer claimId, String flowNotes);

    CommonResult autoCalMoney(Integer claimId);

    CommonResult getReceiveTypeDict(User user, String searchStr);

    CommonResult getResponsibleDeptDict(User user, String searchStr);

    CommonResult abolishClaim(User user, DkClaimCancel dkClaimCancel);

    CommonResult saveAbolishClaim(User user, DkClaimCancel dkClaimCancel);

    CommonResult submitAbolishClaim(User user, DkClaimCancel dkClaimCancel);

    CommonResult resubmitAbolishClaim(User user, DkClaimCancel dkClaimCancel);

    CommonResult cancelClaimAbolish(User user, Integer abolishId);

    List<DkClaimAbolishBean> getClaimAbolishDataList(User user, String searchStr,
                                                     String flowStatus, String monthStr,
                                                     String deptName, Integer pageSize, Integer pageNum) throws Exception;

    CommonResult getClaimAbolishDataById(User user, Integer abolishId);

    CommonResult getClaimAbolishFlow(User user, Integer abolishId);

    CommonResult approveClaimAbolish(User user, String flowNote, Integer abolishId);

    CommonResult rejectClaimAbolish(User user, String flowNote, Integer abolishId);

    List<DkContractBean> getClaimTaskContractList(Integer claimTaskId, String searchStr, Integer pageSize, Integer pageNum) throws Exception;

    CommonResult claimTaskRelateContract(Integer claimTaskId, Integer contractId);

    //发票-选择到款-已认领
    List<DkClaimedBean> getDkClaimedList(BigDecimal invMoney, User user, String searchStr, Integer pageSize, Integer pageNum);

    //求和：全部到款-已认领总金额、到款总金额
    SumDkReceiveMoneyBean getSumDkReceiveMoney(Short coId, String searchStr, String monthStr, String bankType);

    //认领票据时-商承-逾期名单列表
    List<DwmdBean> getScYqmdList(User user, String searchStr, Integer pageSize, Integer pageNum);

    //认领票据时-银承-白名单列表
    List<DwmdBean> getYcBmdList(User user, String searchStr, Integer pageSize, Integer pageNum);
}
